package com.othershe.test;

import android.content.Context;

/**
 * @author wupuquan
 * @version 1.0
 * @since 2018/3/21 21:23
 */
public class Util {

    public static int dp2px(Context context, float dipValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dipValue * scale + 0.5f);
    }
}
